package com.laotou99.backjack.test;

public class Producer implements Runnable {
	
	private Clerk clerk;

	public Producer(Clerk clerk) {
		this.clerk = clerk;
	}

	@Override
	public void run() {
		System.out.println("Producer is product number....");
		for(int product =1;product<=10;product++){
			try {
				Thread.sleep((int)(Math.random()*3000));
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			clerk.setProduct(product);
		}
		
	}

}
